package day_3.demo4;/*
 *@ 代阳敲的专属代码
 **/

public class Test {
    public static void main(String[] args) {
        Animal animal = new Animal();
        Dog dog = new Dog();
        dog.cry();
    }
}
class Animal {
    private int age;
    private Animal cry() {
        System.out.println("动物叫");
        return new Animal();
    }
}
class Dog extends Animal {
    public Dog cry() {
        System.out.println("狗叫");
        return new Dog();
    }
}